<template>
  <div class="login">
    <div class="login-wrapper">
      <div class="login-form">
        <div class="logo">
          <img src="../assets/img/icon.png"  alt="">
        </div>
        <div class="form-wrapper">
          <el-form :model="loginForm" status-icon   label-width="60px" label-position="left">
            <el-form-item label="账号" prop="pass">
              <el-input type="text" v-model="loginForm.userName" auto-complete="off" @keydown.enter.native="login"></el-input>
            </el-form-item>
            <el-form-item label="密码" prop="checkPass">
              <el-input type="password" v-model="loginForm.userPassword" auto-complete="off" @keydown.enter.native="login"></el-input>
            </el-form-item>
            <el-button type="primary" class="login-btn" @click="login">登录</el-button>
          </el-form>
        </div>
      </div>
      <div class="company-logo">
        <img src="../assets/img/logo1.png" alt="">
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loginForm: {
        userName: "",
        userPassword: ""
      }
    };
  },
  methods: {
    login() {
      this.$router.push({ name: "Index" });
    }
  }
};
</script>

<style lang='scss'>
.login {
  width: 100%;
  height: 100%;
  background: #f7f8f8;
  .login-wrapper {
    width: 460px;
    height: 600px;
    padding-top: 137px;
    margin: 0 auto 0;
    .login-form {
      width: 460px;
      height: 540px;
      box-shadow: 2px 1px 6px 0px #aabcce;
      border-radius: 4px;
      .logo {
        padding: 68px 0 21px;
        text-align: center;
      }
      .form-wrapper {
        padding: 0 56px;
        .login-btn {
          width: 100%;
          margin-top: 34px;
          font-size: 14px;
        }
      }
    }
    .company-logo {
      margin-top: 35px;
      text-align: center;
    }
  }
}
</style>
